/**
 * 
 */
package cn.com.gxetc.assistant.dto;

import java.time.Instant;
import java.util.Date;

/**
 * @author yfm
 *
 */
public class Todo {
   
	private String id;
	
	private String title;
	
	private Date startTime;
	
	private String state;
	
	private String dutyUser;
	
	private String fromUser;
    
	private String deptName;
	
	private String tempType;
	
	private String temName;
	
	private String tempTypeId;
	
	private String timeOut;
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getDutyUser() {
		return dutyUser;
	}

	public void setDutyUser(String dutyUser) {
		this.dutyUser = dutyUser;
	}

	public String getFromUser() {
		return fromUser;
	}

	public void setFromUser(String fromUser) {
		this.fromUser = fromUser;
	}

	public String getPeriod() {
		long num=(Date.from(Instant.now()).getTime()-startTime.getTime())/60000;
		if(num>1440){
			long day=(num/1440);
			long hour=((num-1440*day)/60);
			long m=num-1440*day-60*hour;
			
			return day+"天" +hour +"小时"+ m+"分";
		}
		
		if(num>60){
			long hour=(num/60);
			long m=num%60;
		    return hour +"小时"+ m+ "分";
		}
		return  num+ "分";
		
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getTempType() {
		return tempType;
	}

	public void setTempType(String tempType) {
		this.tempType = tempType;
	}

	public String getTemName() {
		return temName;
	}

	public void setTemName(String temName) {
		this.temName = temName;
	}

	public String getTempTypeId() {
		return tempTypeId;
	}

	public void setTempTypeId(String tempTypeId) {
		this.tempTypeId = tempTypeId;
	}

	public String getTimeOut() {
		return timeOut;
	}

	public void setTimeOut(String timeOut) {
		this.timeOut = timeOut;
	}

	
}
